import React, { Component } from 'react'
import { Card, message, Button } from 'antd'
import './index.less'

class Message extends Component {
    state = {
    }
    message = (type) => {
        message[type]('火警预告，快爬！')
    }
    render() {
        return (
            <div>
                <Card title="Loading组件" className="card-wrap">
                    <Button type="primary" onClick={() => this.message('info')}>click info!</Button>
                    <Button type="primary" onClick={() => this.message('success')}>click success!</Button>
                    <Button type="primary" onClick={() => this.message('warning')}>click warning!</Button>
                    <Button type="primary" onClick={() => this.message('error')}>click error!</Button>
                </Card>
            </div>
        )
    }
}
export default Message